<?php
/**
 * Created by PhpStorm.
 * User: zhang
 * Date: 14-10-29
 * Time: 上午9:22
 */
header('Content-type:text/html;charset=utf-8');
if($_POST['name']){
    $path = $_POST['path'];
    $rename = $_POST['name'];
    $arr = explode('.',$rename);
    if(count($arr)>=2){
        if(rename($path,$rename)){
            echo "<script> alert ('修改成功');location='index.html'</script>";
        }else{
            echo "<script> alert ('修改失败');location='index.html'</script>";
        }
    }
}
